home *** CD-ROM | disk | FTP | other *** search
- !!Script
- // Copyright ⌐ 1997-1998 - Modelworks Software
-
- // Insert script helper for:
-
- /**
- @Object: Editor
- @Method: editor.replace(data, fromLineIndex, fromCharIndex, toLineIndex, toCharIndex) replaces
- the range specified by the start and end indexes with the data. Data can be either a string
- or another editor. Returns the range inserted.
- @Syntax: editor.replace(data, fromLineIndex, fromCharIndex, toLineIndex, toCharIndex)
- @Summary: replace - replaces the range specified by indexes
- */
-
- function DoCommand()
- {
- var editor = getActiveEditor();
- if (editor)
- {
- var selection = editor.getSelection();
- editor.replace("editor.replace(data, fromLineIndex, fromCharIndex, toLineIndex, toCharIndex);", selection);
- editor.setActive("Insert editor.replace");
- }
- }
-
- !!/Script
-